﻿using System;

namespace Ficharts.Net.Examples.Examples.Columns
{
    using System.Linq;

    using Ficharts.Net.Examples.Code;

    public partial class MultiSeries : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Test.ChartTitle.Title = "产品销量状况";
            this.Test.Suffix.YSuffix = "K";
            this.Test.XAxises.Add(new FieldAxis { Title = "月份" });
            this.Test.YAxises.Add(new LinearAxis { Title = "产量" });
            this.Test.Series.Add(new Column { SeriesName = "A序列", XField = "Year", YField = "ValueA" });
            this.Test.Series.Add(new Column { SeriesName = "B序列", XField = "Year", YField = "ValueB" });

            Demo demo = new Demo();
            this.Test.DataSource = (from c in demo.sample
                                    select c).ToList();
            this.Test.DataBind();
        }
    }
}